package com.szcinda.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface ContainerOrderRepository extends JpaRepository<ContainerOrder, String>, JpaSpecificationExecutor<ContainerOrder> {
    ContainerOrder findById(String id);
    List<ContainerOrder> findByIdIn(List<String> ids);
    List<ContainerOrder> findAllByPackageTypeOrPackageTypeIsNull(String packageType);
    ContainerOrder findFirstByCabinetNumberAndPackageType(String cabinetNumber, String packageType);
    ContainerOrder findFirstByCabinetNumber(String cabinetNumber);
    ContainerOrder findByOrderId(String orderId);
}
